#include <QtGui/QApplication>
#include <QtDeclarative>
#include <QtCore>
#include <QtGui>

#include "qmlapplicationviewer.h"
#include "backend.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QApplication> app(createApplication(argc, argv));

    Backend backend;

    QmlApplicationViewer viewer;

    viewer.rootContext()->setContextProperty("backend", &backend);

    backend.setQMLEngine(viewer.engine());

    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
    viewer.setMainQmlFile(QLatin1String("qml/aesydisk/main.qml"));
    viewer.showExpanded();

    return app->exec();
}
